/*
Copyright (C) 2009-2010 Xanadu Development Team

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; version 2
of the License.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#pragma once

#include <hash_map>

class Guild;
class Player;
class World;

class Guilds {
private:
	stdext::hash_map <int, Guild*> guilds;
	World* world;
public:
	Guilds(World* world){
		this->world = world;
	}
	Guild* getGuild(int id);
	void create(Player* player, std::string guildname);
	void leave(Player* player);
	void join(Player* player, int guildid);
	void invite(Player* player, std::string name);
	void expel(Player* player, int playerid, std::string name);
	void removeEmblem(Player *player);
	void changeRank(Player* player, int rank, int userid);
	void deleteGuild(int gid);
	void increaseCapacity(Player* player);
};
